package com.xuan.yrmanage.domain.response;


import com.xuan.yrmanage.common.response.ResultCode;

/**
 * Created by mrt on 2018/3/5.
 */

public enum MenuCode implements ResultCode {
    MENU_EXISTS_NAME(false,24001,"菜单名称已存在！"),
    MENU_NOT_EXIST(false,24002,"菜单不存在"),
    MENU_INSERT_FAIL(false,24003,"菜单插入失败"),
    MENU_EDIT_FAIL(false,24004,"菜单修改失败"),
    MENU_QUERY_FAIL(false,24006,"菜单修改失败"),
    MENU_DELETE_FAIL(false,24005,"菜单删除失败");

    //操作代码
    boolean success;
    //操作代码
    int code;
    //提示信息
    String message;
    private MenuCode(boolean success, int code, String message){
        this.success = success;
        this.code = code;
        this.message = message;
    }

    @Override
    public boolean success() {
        return success;
    }

    @Override
    public int code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }
}
